import Vue from 'vue'
import Router from 'vue-router'
import _import from './_import'
import Layout from '@/views/layout/Layout'
import Dashboard from '@/views/dashboard/index'


Vue.use(Router)


export const menuRouterMap = [
    {
        path: '/',
        component: Layout,
        redirect: '/dashboard/index',
        hidden: true
    },
    {
        path: '/dashboard',
        component: Layout,
        noDropdown: true,
        children: [{ path: 'index', component: Dashboard, name: '控制台' }]
    },
    {
        path: '/lesson-1',
        name: '第一季',
        component: Layout,
        children: [
            {path: 'demo1', component: _import('lesson1/demo1'), name: '第1节：走起我的Vue2.0'},
            {path: 'demo2', component: _import('lesson1/demo2'), name: '第2节：v-if  v-else  v-show 指令'},
            {path: 'demo3', component: _import('lesson1/demo3'), name: '第3节：v-for指令 ：解决模板循环问题'},
            {path: 'demo4', component: _import('lesson1/demo4'), name: '第4节：v-text & v-html'},
            {path: 'demo5', component: _import('lesson1/demo5'), name: '第5节：v-on：绑定事件监听器'},
            {path: 'demo6', component: _import('lesson1/demo6'), name: '第6节：v-model指令'},
            {path: 'demo7', component: _import('lesson1/demo7'), name: '第7节：v-bind 指令'},
            {
                path: '/example/table',
                component: _import('lesson1/demo7'),
                name: 'Table',
                children: [
                    { path: 'dynamictable', component: _import('lesson1/demo7'), name: '动态table' },
                    { path: 'dragtable', component: _import('lesson1/demo7'), name: '拖拽table' },
                    { path: 'inline_edit_table', component: _import('lesson1/demo7'), name: 'table内编辑' },
                    { path: 'table', component: _import('lesson1/demo7'), name: '综合table' }
                ]
            }
            /*{path: 'demo8', component: _import('lesson1/demo8'), name: '第8节：其他内部指令(v-pre & v-cloak & v-once)',
            children: [
                {path: 'demo1', component: _import('lesson2/demo1'), name: 'aaaaaaaaa'},
                {path: 'demo2', component: _import('lesson2/demo2'), name: 'bbbbbbbbb'},
                {path: 'demo3', component: _import('lesson2/demo3'), name: 'ccccccccccc'},
            ]}*/

        ]
    },
    {
        path: '/lesson-2',
        name: '第二季',
        component: Layout,
        children: [
            {path: 'demo1', component: _import('lesson2/demo1'), name: '第1节：Vue.directive 自定义指令'},
            {path: 'demo2', component: _import('lesson2/demo2'), name: '第2节：Vue.extend构造器的延伸'},
            {path: 'demo3', component: _import('lesson2/demo3'), name: '第3节：Vue.set全局操作'},
            {path: 'demo4', component: _import('lesson2/demo4'), name: '第4节：Vue的生命周期（钩子函数）'},
            {path: 'demo5', component: _import('lesson2/demo5'), name: '第5节：Template 制作模版'},
            {path: 'demo6', component: _import('lesson2/demo6'), name: '第6节：Component 初识组件'},
            {path: 'demo7', component: _import('lesson2/demo7'), name: '第7节：Component 组件props 属性设置'},
            {path: 'demo8', component: _import('lesson2/demo8'), name: '第8节：Component 父子组件关系'},
            {path: 'demo9', component: _import('lesson2/demo9'), name: '第9节：Component 标签'}

        ]
    },
    {
        path: '/lesson-3',
        name: '第三季',
        component: Layout,
        children: [
            {path: 'demo1', component: _import('lesson3/demo1'), name: '第1节：propsData Option  全局扩展的数据传递'},
            {path: 'demo2', component: _import('lesson3/demo2'), name: '第2节：computed Option  计算选项'},
            {path: 'demo3', component: _import('lesson4/demo3'), name: '第3节：Methods Option  方法选项'},
            {path: 'demo4', component: _import('lesson3/demo4'), name: '第4节：Watch 选项 监控数据'},
            {path: 'demo5', component: _import('lesson3/demo5'), name: '第5节：Mixins 混入选项操作'},
            {path: 'demo6', component: _import('lesson3/demo6'), name: '第6节：Extends Option  扩展选项'}

        ]
    },
    {
        path: '/lesson-4',
        name: '第四季',
        component: Layout,
        children: [
            {path: 'demo1', component: _import('lesson4/demo1'), name: '第1节：实例入门-实例属性'},
            {path: 'demo2', component: _import('lesson4/demo2'), name: '第2节：实例方法'},
            {path: 'demo3', component: _import('lesson4/demo3'), name: '第3节：实例事件'},
            {path: 'demo4', component: _import('lesson4/demo4'), name: '第4节：内置组件 -slot讲解'}

        ]
    }
]

export default new Router({
    routes: menuRouterMap
});